/*
** my_strcmp.c for soutien in /home/le_e//test
** 
** Made by canh-kiet le
** Login   <le_e@epitech.net>
** 
** Started on  Wed Jan 25 09:44:37 2012 canh-kiet le
** Last update Mon Apr 30 21:02:33 2012 canh-kiet le
*/

#include	"my.h"

int		my_strcmp(char *s1, char *s2)
{
  if (!s1 && !s2)
    return (0);
  else if (!s1)
    return (-*s2);
  else if (!s2)
    return (*s1);
  while (*s1 || *s2)
    {
      if (*s1 > *s2 || *s1 < *s2)
	return (*s1 - *s2);
      s1++;
      s2++;
    }
  return (0);
}
